package com.itheima.service;

import com.itheima.dao.UserMapper;
import com.itheima.daomain.User;
import com.itheima.util.SessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;

/**
 * @Descriptionn:test
 * @Create by:依然
 * @Date:2021/11/3 10:58
 */
public class updateServlet {
    public User update(int id) {
        SqlSession sqlSession = SessionFactoryUtils.getSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
        User selects = mapper.selects(id);
        sqlSession.close();
        return selects;

    }

}
